home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / CONTAS2.PAK / CNTRITEM.H < prev    next >
C/C++ Source or Header  |  1997-05-06  |  2KB  |  53 lines

  1. // CntrItem.h : interface of the CContainerItem class
  2. //
  3.  
  4. class CContainerDoc;
  5. class CContainerView;
  6.  
  7. class CContainerItem : public COleClientItem
  8. {
  9.     DECLARE_SERIAL(CContainerItem)
  10.  
  11. // Constructors
  12. public:
  13.     CContainerItem(CContainerDoc* pContainer = NULL);
  14.         // Note: pContainer is allowed to be NULL to enable IMPLEMENT_SERIALIZE.
  15.         //  IMPLEMENT_SERIALIZE requires the class have a constructor with
  16.         //  zero arguments.  Normally, OLE items are constructed with a
  17.         //  non-NULL document pointer.
  18.  
  19. // Attributes
  20. public:
  21.     CRect m_rect;   // position within the document
  22.     CContainerDoc* GetDocument()
  23.         { return (CContainerDoc*)COleClientItem::GetDocument(); }
  24.     CContainerView* GetActiveView()
  25.         { return (CContainerView*)COleClientItem::GetActiveView(); }
  26.  
  27.     // ClassWizard generated virtual function overrides
  28.     //{{AFX_VIRTUAL(CContainerItem)
  29.     public:
  30.     virtual void OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam);
  31.     protected:
  32.     virtual void OnGetItemPosition(CRect& rPosition);
  33.     virtual void OnActivate();
  34.     virtual void OnDeactivateUI(BOOL bUndoable);
  35.     virtual BOOL OnChangeItemPosition(const CRect& rectPos);
  36.     //}}AFX_VIRTUAL
  37. // Operations
  38. public:
  39.     void InvalidateItem();
  40.     void UpdateFromServerExtent();
  41.  
  42. // Implementation
  43. public:
  44.     ~CContainerItem();
  45. #ifdef _DEBUG
  46.     virtual void AssertValid() const;
  47.     virtual void Dump(CDumpContext& dc) const;
  48. #endif
  49.     virtual void Serialize(CArchive& ar);
  50. };
  51.  
  52. /////////////////////////////////////////////////////////////////////////////
  53.